package com.jt.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 *
 */
@Data
@Accessors(chain = true)
@TableName //("user")  //定义表名和对象的关系
public class User implements Serializable {
    private static final long serialVersionUID = 101497814184414270L;
    @TableId(type = IdType.AUTO)//主键自增
    private Integer id;
    @TableField("name")    // 字段映射 如果名称相同，可以省略
    private String name;
    private Integer age;
    private String sex;

}
